//
//  TWBannerCell.swift
//  EyepetizerImitative
//
//  Created by 田伟 on 2017/3/10.
//  Copyright © 2017年 个人. All rights reserved.
//  显示banner的cell

import UIKit

class TWBannerCell: UITableViewCell {

    /*
     bannerCell
     */
    
    @IBOutlet weak var bgImageView: UIImageView!
    
    // MARK:- 自定义属性
    var bannerModel : TWBannerModel?{
        didSet {
            guard let bannerModel = bannerModel else {
                return
            }
            
            let urlString = bannerModel.image
            guard let urlStr = urlString else {
                return
            }
            
            // 设置控件
            bgImageView.sd_setImage(with: URL(string: urlStr))
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
